A number of techniques are known for adjusting the contrast of an image, particularly in order to improve the contrast and therefore visibility of the image. Contrast adjustment or enhancement of images, particularly digital images, is used in many fields, including enhancing the contrast of a digital image for display by a television receiver or other display device, for printing by a printer, in digital cameras, etc., etc. Contrast enhancement is used to improve the contrast in medical and other images.
A known technique is so-called histogram equalisation. A discussion of histogram equalisation can be found in for example “Digital Image Processing”, Prentice Hall, New Jersey, 2001, by R. C. Gonzalez & Richard E. Woods. Histogram equalisation is based on the assumption that an image having good contrast has pixels having brightness levels that are generally equally distributed over the range of possible brightness levels that can be displayed by the display device, printed by the printer, etc. Individual pixels retain their brightness order (i.e. they remain brighter or darker than other pixels) . However, the values of the brightness levels of the individual pixels are adjusted so that they are equally distributed over the brightness scale.
Referring to FIG. 1, in histogram equalisation the brightness levels of the input digital image are subject to histogram generation 1 in which a histogram of the brightness levels of the pixels is generated. Then a cumulative distribution function is generated from the histogram 2. The cumulative distribution function is normalised as necessary to the available dynamic range of the display device, printer, etc. For example, the dynamic range may have 256 grey levels. This normalised cumulative distribution function is then used to map the brightness levels of the input digital image to brightness levels of an output image 3, which can then be passed for display, printing, etc. Histogram equalisation enhances the contrast for brightness values that are close to maxima in the histogram and decreases contrast near the minima. In other words, histogram equalisation improves the contrast in the image in areas of poor contrast at the expense of those areas where there is already good contrast.
A particular limitation of histogram equalisation is that large peaks in the histogram can be caused by large areas of similar brightness. Frequently, these correspond to areas of background which are often uninteresting. In any event, the effect of histogram equalisation can be over-enhancement and increased noise visibility. In the case where the histogram contains tall peaks, the generated cumulative distribution function becomes steep and brightness levels in the input image that are close to each other can be mapped to output brightness levels that are far from each other.
A number of techniques for overcoming this over-enhancement problem are known. For example, a modified cumulative distribution function is disclosed in “Adaptive Image Contrast Enhancement Using Generalizations of Histogram Equalization”, by J. Alex Stark in IEEE Transactions on Image processing, vol. 9, no. 5, May 2000. Referring to FIG. 2, the generated histogram 4 is subject to a modified cumulation function 5 that weighs the histogram values. This weighing function is inversely proportional to the distance from the current pixel brightness level. In this way, large changes in the cumulation function 5 are avoided, such that the mapping 6 does not change the characteristics of the image severely. Nevertheless, a problem with this modified technique is that the weighing functions must be chosen in advance, and no single weighing function is sufficient to create a mapping that will avoid over-enhancement for all images. For example, for an input image that has extremely narrow peaks in the histogram of brightness levels, the weighing function must be adjusted accordingly. However, adjusting the weighing function to deal with narrowly peaked histograms will not give satisfactory visual results when the histogram is not narrowly peaked and the dynamic range is wider.